import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

import org.apache.commons.lang.StringUtils;


public class ArrayTest
{
	/**
	 * @param args
	 */
	public static void main(String[] args)
	{
		List list = new ArrayList();
		list.add("one");
		list.add("two");
		list.add("three");
		
		Object arr = list.toArray();
		System.out.println("arr: " + arr);
		
		String source = "1|2||3";
		String[] result = StringUtils.split(source, '|');
		System.out.println("source: " + source);
		System.out.println("result: " + Arrays.asList(result) + ", length: " + result.length);
		System.out.println("=================");
		
		source = "";
		result = StringUtils.split(source, '|');
		System.out.println("source: " + source);
		System.out.println("result: " + Arrays.asList(result) + ", length: " + result.length);
		System.out.println("=================");
		
		source = null;
		result = StringUtils.split(source, '|');
		System.out.println("source: " + source);
		//System.out.println("result: " + Arrays.asList(result) + ", length: " + result.length);
		System.out.println((new String[] {}).length);
		System.out.println("=================");
		
	}
}
